//
//  ZYXHomeHeaderCell.m
//  RuiBeiKang
//
//  Created by iOS开发1 on 2019/1/3.
//  Copyright © 2019年 JW. All rights reserved.
//

#import "ZYXHomeHeaderCell.h"
#import "ZYXHomeModel.h"
@implementation ZYXHomeHeaderCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code

   
    
    self.scrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, HEIGHT(135))  imageNamesGroup:nil];
    self.scrollView.delegate = self;
    self.scrollView.placeholderImage = [UIImage imageNamed:@"banner"];

//    self.scrollView.localizationImageNamesGroup = [NSArray arrayWithObjects:@"banner",@"banner",@"banner",@"banner",@"banner",@"banner", nil];
    [self.bgView addSubview:self.scrollView];
}
-(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
    
    [self.delegate clickZYXHomeHeaderPic:index];
    
}
-(void)setImgArr:(NSArray *)imgArr{
     if (imgArr) {
    NSMutableArray *picUrl = [NSMutableArray array];
    [picUrl removeAllObjects];
    for(ZYXHomeBannerModel *model in imgArr ){
        
        [picUrl addObject:kImgAllUrl(model.picUrl)];
    }
         self.scrollView.imageURLStringsGroup = picUrl;
    }
}
@end

